<%-- 
    Document   : ViewDesListTour
    Created on : Nov 2, 2011, 12:17:56 AM
    Author     : Mr-aUgust
--%>

<%@page pageEncoding="UTF-8"%>
<%@ page session="true" import="java.util.Collection,DAL.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>East2West Tours and Travels</title> 
    </head>     
    
    <%
    String user="";
    if(session.getAttribute("User")!=null) {
        user=(String)session.getAttribute("User");
    } 
    %>
    
    <body>      
        <%
            
            String idtour="";
            
            if(session.getAttribute("tourId")!=null){
                idtour=session.getAttribute("tourId").toString();
                
                TourPackageBean tourPack=new TourPackageBean();
                Collection coll=tourPack.getTourPackgeId(idtour);
                request.setAttribute("tourPack",coll);
                
            }
            
            %>
            <h1><%=idtour%></h1>
        <table width="490px" style="background-color:#f7f6f6;">
            <tr height="20px">               
            </tr>            
            <tr>
                <td align="left">
                    <table width="100%" border="0" align="left">
                        <c:forEach items="${tourPack}" var="tp">
                            <tr>
                                <td width="300" valign="top" colspan="2">
                                    <img src="${tp.image}" width="120px" height="120px"  title="${tp.tourName}" align="left" style="padding-left: 5px;padding-top: 5px;padding-right: 5px"/>	                                    
                                        <strong style="color:#0000CC;">${tp.tourName}</strong>                                               
                                        <br><br/>
                                       ${tp.state}
                                        <br/>
                                        <br/>
                                        <b> Price audult :  <f:formatNumber value="${tp.adultPrice}" pattern="$#,###"/></b>
                                        <br>
                                        <b> Price child :   <f:formatNumber value="${tp.childPrice} " pattern="$#,###"/></b>
                                                                                                                                                                     
                                       
                                        <form action="index.jsp?page=BookTour" method="post" name="bookt">
                                            <input type="hidden" name="idTour" value="${tp.tourID}"/>
                                            <input type="hidden" name="name" value="${tp.tourName}"/>
                                            <input type="hidden" name="ap" value="${tp.adultPrice}"/>
                                            <input type="hidden" name="cp" value="${tp.childPrice}"/>   
                                            <span style="padding-left:390px;"> <input type="submit" name="Submit" value="Book here" style="border:none;width:80px;font-weight:bold;text-align:center;margin:0px 10px;font-size:12px;background-image:url(skinImgTuor/btnSmall.jpg);color: #fff;" align="right"/></span>
                                        </form>
                                      <br>
                                      
                                  
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <p>
                                      ${tp.description}
                                    </p>
                                </td>
                            </tr>
                        </c:forEach>
                    </table>
                    
                </td>
            </tr>
            
            
        </table>
        <br/>
        <a href="index.jsp?page=listTour" style="text-align:right;">List of tours</a>
    </body>
  
</html>
